package Substring;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TestReplace {

    public static void main(String[] args) {
//        StringBuilder sb = new StringBuilder("成吉思汗");
//        System.out.println(replaceNameX(sb.toString()));
        Double a = 3.24;
        double v = a * 100;
        System.out.println(v);
        System.out.println(v / 100);
//        boolean b1 = a > b;
//        System.out.println(b1);


    }

    public static String replaceNameX(String str) {
        // 获取姓名长度
        String custName = str;
        int length = custName.length();

        String reg = ".{1}";
        StringBuffer sb = new StringBuffer();
        Pattern p = Pattern.compile(reg);
        Matcher m = p.matcher(str);
        int i = 0;
        while (m.find()) {
            i++;
            if (i == length)
                continue;
            m.appendReplacement(sb, "*");
        }
        m.appendTail(sb);
        return sb.toString();
    }

}
